
<?php include_once(dirname(__FILE__) . '/../general/head.php'); ?>

<?php include_once(dirname(__FILE__) . '/../general/header.php'); ?>

<?php include_once('left.php'); ?>
<div id="page-wrapper">


    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">Đánh giá thái độ</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    Danh sách
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">
                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover sb-table">
                            <thead>
                                <tr>
                                    <th>Id</th>
                                    <th>Username</th>
                                    <th>Email</th>
                                    <th>Kết quả</th>
                                    <th>Ngày đánh giá</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php
                                if ($result == false) {
                                    ?>
                                    <tr>
                                        <td colspan="5">
                                            No record found!
                                        </td>
                                    </tr>
                                    <?php
                                } else {
                                    foreach ($result as $row) {
                                        ?>
                                        <tr>
                                            <td style="vertical-align: middle;"><?php echo $row->id; ?></td>
                                            <td style="vertical-align: middle;"><?php echo $row->username; ?></td>
                                            <td style="vertical-align: middle;"><?php echo $row->email; ?></td>
                                            <td style="vertical-align: middle;">
                                                <?php 
                                                $i = rand(0, 1); 
                                                if($i==0) {
                                                ?>
                                                <a href="#">Đánh giá thái độ</a>
                                                <?php
                                                }
                                                else
                                                {
                                                    $i2 = rand(0, 2);
                                                    switch ($i2)
                                                    {
                                                        case 0:
                                                            echo '<font color="green">Tốt</font>';
                                                            break;
                                                        case 1:
                                                            echo '<font color="#e5e500">Có thể hiện</font>';
                                                            break;
                                                        case 2:
                                                            echo '<font color="red">Cần cải thiện</font>';
                                                            break;
                                                    }
                                                }
                                                ?>
                                            </td>
                                            <td><?php 
                                                
                                                if($i==0) {
                                                ?>
                                                
                                                <?php
                                                }
                                                else
                                                {
                                                    echo '15/5/2014';
                                                }
                                                ?></td>
                                        </tr>

                                        <?php
                                    }
                                }
                                ?>

                            </tbody>
                        </table>
                        <br>
                        <a href="<?php echo site_url(get_folder($loggedUser['title']).'/users/add_new'); ?>"> <img src="<?php echo base_url(); ?>images/plus.png" title="Thêm nhân viên mới"> Thêm nhân viên mới</a>
                    </div>

                </div>
                <!-- /.panel-body -->
            </div>
        </div>
    </div>


</div>

<?php include_once(dirname(__FILE__) . '/../general/footer.php'); ?>
